Optimal. Leaf size=51 \[ \frac {B (a \sin (c+d x)+a)^4}{4 a^2 d}+\frac {(A-B) (a \sin (c+d x)+a)^3}{3 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {2833, 43} \[ \frac {B (a \sin (c+d x)+a)^4}{4 a^2 d}+\frac {(A-B) (a \sin (c+d x)+a)^3}{3 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 2833
Rubi steps
\begin {align*} \int \cos (c+d x) (a+a \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx &=\frac {\operatorname {Subst}\left (\int (a+x)^2 \left (A+\frac {B x}{a}\right ) \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {\operatorname {Subst}\left (\int \left ((A-B) (a+x)^2+\frac {B (a+x)^3}{a}\right ) \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {(A-B) (a+a \sin (c+d x))^3}{3 a d}+\frac {B (a+a \sin (c+d x))^4}{4 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 49, normalized size = 0.96 \[ \frac {\frac {1}{3} (A-B) (a \sin (c+d x)+a)^3+\frac {B (a \sin (c+d x)+a)^4}{4 a}}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.88, size = 72, normalized size = 1.41 \[ \frac {3 \, B a^{2} \cos \left (d x + c\right )^{4} - 12 \, {\left (A + B\right )} a^{2} \cos \left (d x + c\right )^{2} - 4 \, {\left ({\left (A + 2 \, B\right )} a^{2} \cos \left (d x + c\right )^{2} - 2 \, {\left (2 \, A + B\right )} a^{2}\right )} \sin \left (d x + c\right )}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 88, normalized size = 1.73 \[ \frac {3 \, B a^{2} \sin \left (d x + c\right )^{4} + 4 \, A a^{2} \sin \left (d x + c\right )^{3} + 8 \, B a^{2} \sin \left (d x + c\right )^{3} + 12 \, A a^{2} \sin \left (d x + c\right )^{2} + 6 \, B a^{2} \sin \left (d x + c\right )^{2} + 12 \, A a^{2} \sin \left (d x + c\right )}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.24, size = 75, normalized size = 1.47 \[ \frac {\frac {B \,a^{2} \left (\sin ^{4}\left (d x +c \right )\right )}{4}+\frac {\left (a^{2} A +2 B \,a^{2}\right ) \left (\sin ^{3}\left (d x +c \right )\right )}{3}+\frac {\left (2 a^{2} A +B \,a^{2}\right ) \left (\sin ^{2}\left (d x +c \right )\right )}{2}+a^{2} A \sin \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 68, normalized size = 1.33 \[ \frac {3 \, B a^{2} \sin \left (d x + c\right )^{4} + 4 \, {\left (A + 2 \, B\right )} a^{2} \sin \left (d x + c\right )^{3} + 6 \, {\left (2 \, A + B\right )} a^{2} \sin \left (d x + c\right )^{2} + 12 \, A a^{2} \sin \left (d x + c\right )}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.10, size = 66, normalized size = 1.29 \[ \frac {\frac {a^2\,{\sin \left (c+d\,x\right )}^2\,\left (2\,A+B\right )}{2}+\frac {a^2\,{\sin \left (c+d\,x\right )}^3\,\left (A+2\,B\right )}{3}+\frac {B\,a^2\,{\sin \left (c+d\,x\right )}^4}{4}+A\,a^2\,\sin \left (c+d\,x\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.99, size = 117, normalized size = 2.29 \[ \begin {cases} \frac {A a^{2} \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {A a^{2} \sin {\left (c + d x \right )}}{d} - \frac {A a^{2} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {B a^{2} \sin ^{4}{\left (c + d x \right )}}{4 d} + \frac {2 B a^{2} \sin ^{3}{\left (c + d x \right )}}{3 d} - \frac {B a^{2} \cos ^{2}{\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (A + B \sin {\relax (c )}\right ) \left (a \sin {\relax (c )} + a\right )^{2} \cos {\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________